const Router = require('koa-router');
const router = new Router();
const jsonData = require('../data.json')

router.get('/list', async (ctx) => {
  let results = jsonData.userList

  ctx.type = 'html'
  ctx.body = JSON.stringify(results)

  //以下是 json 方式返回
  /*   ctx.body = {
      status: 'success',
      message: JSON.stringify(results)
    } */

})

module.exports = router;
